<%--
    Document   : addcar
    Created on : Jun 19, 2011, 8:13:54 PM
    Author     : Hany
--%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Diminishing   by Free CSS Templates</title>
<link href="style.css" rel="stylesheet" type="text/css" media="screen" />

<script type="text/JavaScript" language="JavaScript">
function validate()
{	
    var carname = document.lab7.carname.value;
        

	if(carname=="")
	{
		alert("please enter car name");
		document.lab7.carname.focus();
		return false;
	}
        
        var model=document.lab7.model.value;
	if(model=="")
	{
		alert("please enter car model");
		document.lab7.model.focus();
		return false;
	}
        
        var numberplate=document.lab7.numberplate.value;
	
	if(numberplate=="")
	{
		alert("please enter car number plate");
		document.lab7.numberplate.focus();
		return false;
	}
        
        var rent=document.lab7.rent.value;
	if(rent=="")
	{
		alert("please enter car's rent per day");
		document.lab7.rent.focus();
		return false;
	}
	
	
          

}


</script>

</head>
<body>
    
     <%
            if(session.getAttribute("username") == null || !session.getAttribute("username").toString().equals("admin")){
                session.setAttribute("msg", "Only admin can add a car!");
                response.sendRedirect("signin.jsp");
                               }
            else
                {
                %>
                
<div id="wrapper">
	<div id="menu">
		<ul>
			<li class="current_page_item"><span><a href="index.jsp">Home</a></span></li>
			<li ><a href="signin.jsp">Sign in</a></li>
			<li><a href="update.jsp">Update Profile</a></li>
			<li><a href="intro.jsp">About</a></li>
			<li><a href="reserve.jsp">Reserve Car</a></li>
			<li><a href="contact.jsp">Contact</a></li>
		</ul>
	</div>
	<!-- end #menu -->
	<div id="header">
		<div id="logo">
			<h1><a href="#">Rent A Car</a></h1>
		</div>
		<div id="search">
			<form method="get" action="">
				<fieldset>
					<input type="text" name="s" id="search-text" size="15" value="enter keywords here..." />
					<input type="submit" id="search-submit" value="GO" />
				</fieldset>
			</form>
		</div>
	</div>
	<div id="splash">&nbsp;</div>
	<!-- end #header -->
	<div id="page">
		<div id="page-bgtop">
			<div id="page-bgbtm">
				<div id="content">
                                    
                                    <h2 color: #2C2723;>Add new Car</h2>
					<form name=lab7 action="carcontroller"  method=get onSubmit="return validate()">
<input type="hidden" name="action" value="addcar">
<input type="hidden" name="hide" value="">
    
<table>
    <tr>
	<td><hr/></td>
	
    </tr>
<tr><td><font face="verdana,arial" size=-1>Car Name:</td><td><input type="text" name="carname"></td></tr>
<tr><td><font face="verdana,arial" size=-1>Model:</td><td><input type="text" name="model"></td></tr>


<tr>
	<td align="right"><font face="verdana,arial" size=-1>Number plate:</td>
	<td><input type="text" name="numberplate"></td>
</tr>

<tr>
	<td align="right"><font face="verdana,arial" size=-1>Rent per day:</td>
	<td><input type="text"  name="rent"></td>
</tr>

<tr>
		<td align="right"></td>
		<td><input type="submit" name="submit" value="save"></td>
	</tr>
<tr>
	<td align="right"></td>
	<td><div name="Ustatus" id="Ustatus" style="color:red"></div></td>
</tr>





</table>
</form>
                            <h3><a href="index.jsp">Back</a></h3>
				</div>
				<!-- end #content -->
				<div id="sidebar">
					<ul>
						<li>
							<h2>Solution of pollution</h2>
							<p>Pollution is a big problem of today whether it is air or noise. Environmentalists embrace hybrid cars as a solution to today's pollution problems.</p>
						</li>
						<li>
							<h2>Branches</h2>
							<ul>
								<li><a href="contact.jsp">Lahore Branch</a></li>
								<li><a href="karachi.jsp">Karachi Branch</a></li>
								<li><a href="isl.jsp">Islamabad Branch</a></li>
								<li><a href="faisal.jsp">Faisalabad Branch</a></li>
								<li><a href="rawal.jsp">Rawalpindi Branch</a></li>
								
							</ul>
						</li>
						<li>
							<h2>Menu</h2>
							<ul>
								<li><a href="hybrid.jsp">Hybrid Cars</a></li>
								<li><a href="addcar.jsp">Add cars</a></li>
								<li><a href="delCars.jsp">Delete Cars</a></li>
								<li><a href="freeCars.jsp">Make Car Reserved free</a></li>
								<li><a href="#">Beautiful Photos</a></li>
							</ul>
						</li>
						
					</ul>
				</div>
				<!-- end #sidebar -->
				<div style="clear: both;">&nbsp;</div>
			</div>
		</div>
	</div>
	<!-- end #page -->
</div>
<div id="footer-wrapper">
	<div id="three-columns">
		<div id="column1">
			<h2>Branches</h2>
			<ul>
				<li><a href="contact.jsp">Lahore Branch</a></li>
				<li><a href="karachi.jsp">Karachi Branch</a></li>
				<li><a href="isl.jsp">Islamabad Branch</a></li>
				<li><a href="faisal.jsp">Faisalabad Branch</a></li>
				<li><a href="rawal.jsp">Rawalpindi Branch</a></li>
				
			</ul>
		</div>
		<div id="column2">
			<h2>Menu</h2>
			<ul>
				<li><a href="hybrid.jsp">Hybrid Cars</a></li>
				<li><a href="addcar.jsp">Add Cars</a></li>
				<li><a href="delCars.jsp">Delete Cars</a></li>
				<li><a href="freeCars.jsp">Make Car Reserved free</a></li>
				<li><a href="#">Beautiful Photos</a></li>
		</div>
		
	</div>
	<div id="footer">
		<p>Copyright (c) 2011 Sitename.com. All rights reserved. Design by <a href="http://www.freecsstemplates.org/"> CSS Templates</a>.</p>
	</div>
	<!-- end #footer -->
</div>

<% } %>
</body>
</html>
